import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		hasLogin: false,
		userInfo: {},
	},
	mutations: {
		wxLogin: function() {
			uni.login({
				provider: 'weixin',
				success: function(loginRes) {
					wx.request({
						url: 'https://xxxxx' + loginRes.code,
						success: function(info) {
							console.log(info);
						},
						fail: function(e) {
							console.log(e)
						}
					})
				}
			})
		}
	},
	actions: {

	}
})

export default store